<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{layout}">

<head>
    <title>玩家登录日志</title>
</head>

<body>
<div layout:fragment="content">
    <div class="mt-4">
        <table class="table table-hover">
            <thead class="table-dark">
            <tr>
                <th>用户名</th>
                <th>联系电话</th>
                <th>邮箱</th>
                <th>时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="log : ${userLogs}">
                <td th:text="${log.user.username}">示例用户</td>
                <td th:text="${log.user.phone}">110</td>
                <td th:text="${log.user.email}">123@qq.com</td>
                <td th:text="${#temporals.format(log.time, 'yyyy-MM-dd HH:mm:ss')}">2023-01-01 12:00:00</td>
                <td>
                    <span th:if="${log.login}" class="text-success">登录系统</span>
                    <span th:unless="${log.login}" class="text-danger">退出系统</span>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
</body>
</html>